package org.lgiavedoni.android.franq.core.calendar;

import java.util.Date;

import org.lgiavedoni.android.franq.util.date.DateUtil;

public class CalendarEventImp implements CalendarEvent {

	private String title;
	private String description;
	private Date startDate;
	private Date endDate;

	public CalendarEventImp(String title, String description, Date startDate, Date endDate) {
		super();
		this.title = title;
		this.description = description;
		this.startDate = startDate;
		this.endDate = endDate;
	}

	public CalendarEventImp(String title, String description, Date startDate) {
		super();
		this.title = title;
		this.description = description;
		this.startDate = startDate;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate != null ? endDate : new Date(startDate.getTime() + DateUtil.getMillisecondsOfMins(5));
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

}
